home *** CD-ROM | disk | FTP | other *** search
/ How Would You Survive? / How Would You Survive (1995)(Grolier)[Mac-PC].iso / pc / aindex.dir / 00746_Script_ StartMovie Handlers < prev    next >
Text File  |  1995-09-06  |  2KB  |  91 lines

  1. --òò StartMovie Handlers
  2. --** July 15 95 2 P.M.
  3. --** Needs to have functions added to reference link cast members
  4. Global gBtn16, gBtn18, gWhatMovie, gTheHelpIsOn,gReInitGlobals  , gIndexManager
  5.  
  6. on StartMovie
  7.   set gBtn16 = birth(script "a3StateButton", 46, 1931, "SA141819.AIF", "CrossEIndex", "HandCursor")
  8.   set gBtn18 = birth(script "a3StateButton", 48, 1928, "SA141819.AIF", "CrossVIndex", "HandCursor")
  9.   put "AztecW" into gWhatMovie
  10.   if gReInitGlobals = 1 then
  11.     AGlobalsSetUpFromTheatre
  12.     set gReInitGlobals = 0
  13.   end if
  14.   AGlobalsSetUpIndex
  15.   set gTheHelpIsOn = 0
  16.   initializeIndex
  17.   set the cursor of sprite 3 = [1904 , 1905]
  18.   set spriteCount = 3
  19.   repeat while (spriteCount < 29)
  20.     set the cursor of sprite spriteCount = [1904 , 1905]
  21.     set spriteCount = spriteCount + 1
  22.   end repeat
  23.   set the cursor of sprite 40 = [1904 , 1905]
  24. end
  25.  
  26.  
  27. on StopMovie
  28.   hidecontrol (gBtn16)
  29.   hidecontrol (gBtn18)
  30.   set gBtn16 = 0  
  31.   set gBtn18 = 0
  32.   unload 1, 425
  33.   disposeIndexSystem
  34. end
  35.  
  36.  
  37.  
  38. --òòInitialize Index System Code
  39. on initializeIndex
  40.   --òò use sprite 2 to hold sub menu
  41.   puppetSprite 2,TRUE
  42.   --òò use sprite 40 to hold sub memu icon art
  43.   puppetSprite 40,TRUE
  44.   set gIndexManager = birth ( script "aIndexManager")
  45.   initIndex(gIndexManager)
  46. end
  47.  
  48. on resetIndex me
  49.   resetIndex(gIndexManager )
  50. end
  51.  
  52. --òòDispose of objects
  53. on disposeIndexSystem
  54.   puppetSprite 2, FALSE
  55.   puppetSprite 40,FALSE
  56.   set gIndexManager = 0
  57. end
  58.  
  59. --òòUser input interface handlers : Track mouse movement and clicks
  60. on rolloverIndex
  61.   testIndexRollover(gIndexManager)
  62. end
  63.  
  64. on clickAlpha
  65.   clickAlpha(gIndexManager)
  66. end
  67.  
  68. on clickTopic 
  69.   clickTopic(gIndexManager)
  70. end
  71.  
  72. on clickRefLink
  73.   set horzPos = the mouseH
  74.   set vertPos = the mouseV
  75.   --put "V="&&vertPos&&"H="&&horzPos
  76.   clickRefLink(gIndexManager ,horzPos,vertPos)
  77. end
  78.  
  79.  
  80. on doBeep
  81.   --beep 3
  82.   --put "gotFunctionString"
  83. end
  84.  
  85. on setTEXT startC,stopC
  86.   repeat while (startC <= stopC)
  87.     set the scriptText of cast startC = "--0,0,0,0,doBeep;"
  88.     set startC = startC + 1
  89.   end repeat
  90. end
  91.